Skip to main content

All Questions

0votes
1answer
619views

How does SelectFromModel from scikit-learn select features?

When I use XGBClassifier with SelectFromModel the algorithm always returns around five features regardless of the ...
N_Z's user avatar
  • 193
0votes
1answer
87views

Encoding Categorical feature with high cardinality - in my case IP adresses

I'm working on an intrusion detection project, I have many categorical features, for some I used label encoding since I don't have many possible values. But for IP addresses, it's a high cardinality ...
biihu's user avatar
1vote
0answers
38views

How to return selected features with different feature selection models?

I use the below function to detect the effect of those feature selection models on my data, it works perfectly. what I want is to return the name of selected features for each model, is there any ...
N_Z's user avatar
  • 193
1vote
0answers
165views

Using F_regression to find the best significant features

We are trying to use SelectKBest F_Regression scoring function on a pool of 1000 numerical features, and solve a regression problem. Also, we wanted to paralellize the execution of SelectKBest and we ...
Atul Mishra's user avatar
2votes
1answer
2kviews

How to deal with date features in linear regression?

I need some help about a project. I have a dataframe like that; YEAR MONTH INDICATOR_1 INDICATOR_2 INDICATOR_3 2014 3 0.123 0.495 0.222 My goal is to predict all of the indicator for the next year (...
Alan CUZON's user avatar
1vote
0answers
112views

How to implement kfold and cv into Hybrid feature selection and evaluate the classification model performance?

I have been working on a Hybrid feature selection combined with hyperopt package for hyperparameter tuning and I am thinking about evaluating the performance of several model classifiers. I looked ...
WDpad159's user avatar
0votes
1answer
2kviews

Why scikit-learn's sequential feature selection requires how much features to be selected beforehand?

From the version 0.24, the scikit-learn has new method 'SequentialFeatureSelector', which adds (forward selection) or removes (backward selection) features to form a feature subset in a greedy fashion....
Eiffelbear's user avatar
0votes
0answers
162views

Year/Month as a feature in Random Forest Classifier

I need to include a Maturity Date feature in my scikit-learn RandomForestClassifier model. Since the day is too specific, I'm thinking of having a number with the ...
ps0604's user avatar
2votes
1answer
2kviews

Feature importance with Text features

I would like to determine features importance in several models: support vector machine logistic regression Naive Bayes random forest I read that I will need an agnostic model, so I have thought to ...
Math's user avatar
  • 161
1vote
2answers
2kviews

How to retrieve column names from applying a wrapper method in feature selection?

This question probably has a simple answer to it, so I will get to the point... How do I retrieve the names of the columns from applying a wrapper method in feature selection? Code I have used: ...
user avatar
1vote
1answer
223views

Lasso Regression for Feature Importance saying almost every feature is unimportant?

I have a metric (RevenueSoFar) that is a great predictor of my target FinalRevenue as you'd expect - it is a metric where we tend to get 90-95% of revenue so far on day 1 and then it can increase over ...
James's user avatar
2votes
1answer
1kviews

Scikit-learn SelectKBest is picking up obviously unwanted Features

Dataset Dataset Summary: Bank Loan (classification) problem Problem Summary: I am exploring ways to simplify EDA Process (Exploratory Data Analysis) of finding the best fit variables I came across ...
Srinath Ganesh's user avatar
10votes
4answers
6kviews

How to perform feature selection on dataset with categorical and numerical features?

I am working on a dataset with 30 columns (29 numerical, 1 non-ordinal categorical). I hot-encoded the categorical feature and reached at 35 columns. To improve training efficiency, I want to perform ...
Songyu Yan's user avatar
0votes
2answers
1kviews

How do feature selection on a sparse matrix?

Say I want to do features selection on a sparse matrix, i.e., 10,000 rows x 1500 features, but the matrix is mostly sparse. Let's say the features are all numeric and the target is binary and discrete....
Steven Chen's user avatar
1vote
1answer
4kviews

Why linear regression feature coefficients become super large?

Introduction I've implemented linear regression using sklearn and after all calculations I've got results like this: ...
えるまる's user avatar

153050per page
close